A bit error often occurs in a signal transmission process. The bit error occurs because decay changes a voltage of a signal in the signal transmission process, causing the signal to be damaged during transmission. The bit error is caused by noise, a pulse caused by an alternating current or a lightning strike, a transmission device fault, or another factor. For example, a transmitted signal is 1, but a received signal is 0; or a transmitted signal is 0, but a received signal is 1. A traffic loss may be caused when the bit error occurs.
In the prior art, a bidirectional forwarding detection (BFD) mechanism is usually used to transfer a bit error. The BFD is a fast and independent “hello” protocol, and can achieve millisecond-level link fault detection. In the BFD, after a session is established between neighboring systems, a BFD packet is periodically sent on a channel between the neighboring systems. If a system fails to receive a BFD packet within an agreed detection time period, it is considered that a part of the bidirectional channel encounters a fault. When a bit error occurs in a direction of a link, the bit error may be carried in a protocol packet sent using the BFD, to notify a peer end of the bit error, so that the peer end device also perceives the bit error. In an upper-layer protocol, a cost value of a link is adjusted by perceiving a bit error, so as to trigger traffic adjustment.
It is found through practice that the BFD is based on a layer 3 User Datagram Protocol (UDP) protocol, depends on an internet protocol (IP) address, and cannot be applied to a layer 2 network. Therefore, currently, there is an urgent need to provide a solution for transferring a bit error in the layer 2 network.